﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using TabbedTemplate.Models;

namespace TabbedTemplate.Services
{
    public interface ISearchResultService
    {
        /// <summary>
        /// 数据库是否已经初始化。
        /// </summary>
        /// <returns></returns>
        bool Initialized();

        /// <summary>
        /// 初始化。
        /// </summary>
        /// <returns></returns>
        Task InitializeAsync();
        /// <summary>
        /// 插入一条缓存内容。
        /// </summary>
        /// <param name="uid">店铺</param>
        /// <param name="id">搜索记录</param>
        /// <returns></returns>
        Task InsertSearchItem(string uid, int id, long TimeStamp);
        /// <summary>
        /// 读取当前id对应的店铺。
        /// </summary>
        /// <returns></returns>
        Task<IList<SearchResult>> GetStoresById(int id);

        Task CloseAsync();

        Task DeleteCacheById(int id);


    }
}
